package com.ehome.emergency.entities;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;

/**
 * BasicFramework
 *
 * @author: haoxiaolei
 * @date: 2016-07-18 09:56
 * @desc: 登录页设置
 */
@Entity
@Table(name = "share_login_page")
@DynamicInsert
@DynamicUpdate
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE, region = "com.ehome.emergency.entities.LoginPage")
public class LoginPage implements Serializable {
    private static final long serialVersionUID = 8142023189608250550L;

    //成员变量**********************************************************************
    /**
     * 主键
     */
    @Id
    @GenericGenerator(name = "share_login_page_id_generator", strategy = "native")
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;
    /**
     * 背景图片地址
     */
    @Column(name = "background_image")
    private String backgroundImage;
    /**
     * 背景颜色值
     */
    @Column(name = "background_color", length = 20)
    private String backgroundColor;
    /**
     * 功能描述
     */
    @Column(name = "description")
    private String description;
    /**
     * 租户Id.
     */
    @Column(name = "tenantId", length = 15)
    private String tenantId;
    /**
     * 状态:  AVAILABLE  可用
     *       UNAVAILABLE  不可用
     */
    @Column(name = "status", length = 18, nullable = false)
    private String status;


    //setter/getter****************************************************************
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getBackgroundImage() {
        return backgroundImage;
    }

    public void setBackgroundImage(String backgroundImage) {
        this.backgroundImage = backgroundImage;
    }

    public String getBackgroundColor() {
        return backgroundColor;
    }

    public void setBackgroundColor(String backgroundColor) {
        this.backgroundColor = backgroundColor;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getTenantId() {
        return tenantId;
    }

    public void setTenantId(String tenantId) {
        this.tenantId = tenantId;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }
}
